package com.neo.impatient.C13_Collection.C13_02_List

object variableList {

  def main(args: Array[String]): Unit = {

    val lst = scala.collection.mutable.LinkedList(1, -2, 7, -9)
    println(lst)
    var cur = lst
    while (cur != Nil){
      if (cur.elem < 0)
        cur.elem = 0
        println(cur.elem)
        cur = cur.next
      }
   println(lst)
  }

}
